<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Test Page</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            padding: 20px;
            background-color: #f0f0f0;
        }
        .container {
            background-color: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        h1 {
            color: #333;
            text-align: center;
        }
        .status {
            background-color: #4CAF50;
            color: white;
            padding: 10px;
            border-radius: 4px;
            text-align: center;
            margin: 10px 0;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>HarmonyOS Web 测试页面</h1>
        <div class="status">✅ Web 组件工作正常</div>
        <p>如果您能看到这个页面，说明 Web 组件基本功能正常。</p>
        <p>当前时间: <span id="time"></span></p>
        <button onclick="testFunction()">测试 JavaScript</button>
        <div id="result"></div>
    </div>

    <script>
        function updateTime() {
            document.getElementById('time').textContent = new Date().toLocaleString();
        }
        
        function testFunction() {
            document.getElementById('result').innerHTML = '<div style="color: green; margin-top: 10px;">✅ JavaScript 执行成功!</div>';
            console.log('Test function executed successfully');
        }
        
        // Update time every second
        setInterval(updateTime, 1000);
        updateTime();
        
        console.log('Test page loaded successfully');
    </script>
</body>
</html>